package com.wxw.BaseLibrary.net.bean;

import com.wxw.BaseLibrary.tool.ToolsDate;
import lombok.Getter;
import lombok.Setter;

public class PS_Message {
	public static final String ALL_USER = "all_user";
	@Setter
	@Getter
	private int pk_id;
	@Setter
	@Getter
	private String app_id;
	@Setter
	@Getter
	private String receiver;
	@Setter
	@Getter
	private int pk_type;
	@Setter
	@Getter
	private String msg_key;
	@Setter
	@Getter
	private String msg_content;
	@Setter
	@Getter
	private String msg_time;
	@Setter
	@Getter
	private String msg_author;
	@Setter
	@Getter
	private int msg_state;
	@Setter
	@Getter
	private String msg_invalid_time;
	@Setter
	@Getter
	private String read_time;

	public static PS_Message createMessage(String author, String content) {
		return createMessage(author, content, "");
	}

	public static PS_Message createMessage(String author, String content, String key) {
		PS_Message message = new PS_Message();
		message.setMsg_author(author);
		message.setMsg_time(ToolsDate.getDateLine());
		message.setMsg_content(content);
		message.setMsg_key(key);
		return message;
	}
}